package com.itheima.day10.Outputzijie;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

//完成文件拷贝案例
public class ZongheAnli {
    public static void main(String[] args) throws Exception {
//需求，将D:\hmkecheng\就业资料\1.java进阶\day09-字符集、IO流（一）\PPT\day09、java.io包下的常用API-io流.pptx拷贝到E:盘
        FileInputStream fis = new FileInputStream("D:\\hmkecheng\\就业资料\\1.java进阶\\day09-字符集、IO流（一）\\PPT\\day09、java.io包下的常用API-io流.pptx");
        FileOutputStream fos = new FileOutputStream("E:\\day09、java.io包下的常用API-io流.pptx");
        byte[] b = new byte[1024];
        int len=-1;
        while((len = fis.read(b))!=-1){
            fos.write(b,0,len);
        }
        fos.close();
        fis.close();
        System.out.println("复制完毕");
    }
}
